﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CqusInfo.DAL.Question;
using CqusInfo.RAL.Question;

namespace CqusInfo.BLL.Question
{
    public class QuestionBLL:Inteface.IQuestionBLL
    {
        private static readonly QuestionDAL qDal = new QuestionDAL();
        public Int32 GetCounts(bool isDel)
        {
            return qDal.GetCounts(isDel);
        }

        public List<RAL.Question.QuestionModel> Query(DateTime startTime, DateTime endTime, bool isDel, bool isReplay, Int32 page, Int32 takeItem)
        {
            return qDal.Query(startTime, endTime, isDel, isReplay, page, takeItem);
        }

        public List<RAL.Question.QuestionModel> Query(string qId)
        {
            return qDal.Query(qId);
        }

        public List<RAL.Question.QuestionModel> Query(string userName, bool isDel, bool isReplay, Int32 page, Int32 takeItem)
        {
            return qDal.Query(userName, isDel, isReplay, page, takeItem);
        }

        public List<RAL.Question.QuestionModel> Query(Int32 page, Int32 takeItem, bool isDel, bool isReplay)
        {
            return qDal.Query(page, takeItem, isDel, isReplay);
        }

        public Int32 Add(RAL.Question.QuestionModel model)
        {
            return qDal.Add(model);
        }

        public Int32 Delete(string qId, bool isDel, bool trueDel)
        {
            return qDal.Delete(qId, isDel, trueDel);
        }

        public Int32 Update(string qId, RAL.Question.QuestionModel model)
        {
            return qDal.Update(qId, model);
        }
    }
}
